package gspushmq.v1.produce;

import java.util.Set;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingQueue;

import com.alibaba.fastjson.JSONArray;

import gspushmq.model.ApiDataMessage;
import gspushmq.model.ApiMessage;
import gspushmq.model.ApiMessageType;
import gspushmq.model.DataBase;
import gspushmq.model.DataMessage;
import gspushmq.model.MessageType;

public class GGDataStorage {
	/**
	 *
	 * @description 订阅-消费 消息池 put(阻塞)
	 * @param
	 *
	 * @version 1.0
	 * @author chengsja
	 * @date 2018/12/13 14:43
	 *
	 */
	public static BlockingQueue<DataMessage>  dataMessageBlockingQueue = new LinkedBlockingQueue<>();

	//api总记录数
//	public static ConcurrentHashMap<Message, DataCount> APICountMap = new ConcurrentHashMap<>();
	//消费数据 用完销毁
	public static ConcurrentHashMap<MessageType, DataMessage> MessageMap = new ConcurrentHashMap<>();
	public static ConcurrentHashMap<MessageType, Set<DataMessage>> MessageSetMap = new ConcurrentHashMap<>();

	//基础库的数据  更新
	public static ConcurrentHashMap<MessageType, DataBase> BaseMap = new ConcurrentHashMap<>();
	
	//api基础库的数据  更新
	public static ConcurrentHashMap<ApiMessageType, DataBase> ApiBaseMap = new ConcurrentHashMap<>();
	//一类消息和用户无关
	public static ConcurrentHashMap<ApiMessageType, JSONArray> ApiListMap = new ConcurrentHashMap<>();
	//每个用户的消息
//	public static ConcurrentHashMap<ApiMessage, JSONArray> ApiAccountListMap = new ConcurrentHashMap<>();
	
	//消费数据 用完销毁
	public static ConcurrentHashMap<ApiMessage, ApiDataMessage> ApiMessageMap = new ConcurrentHashMap<>();
	
}
